package org.ztr.yanai.ai.tool;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.ai.tool.annotation.Tool;
import org.springframework.stereotype.Component;

/**
 * @Author: ZhaoTR
 * @Date: Created in 2025/11/4 19:56
 * @Description: 工具类
 * @Version: 1.0
 */
@Component
public class MathTool {
    private static final Logger logger = LogManager.getLogger(MathTool.class);

    @Tool(description = "Add two numbers")
    public Integer addNumbers(Integer a, Integer b) {
        return a + b;
    }

    @Tool(description = "Subtract two numbers")
    public Integer subtractNumbers(Integer a, Integer b) {
        return a - b;
    }

    @Tool(description = "Multiply two numbers")
    public Integer multiplyNumbers(Integer a, Integer b) {
        return a * b;
    }

    @Tool(description = "Divide two numbers")
    public Integer divideNumbers(Integer a, Integer b) {
        return a / b;
    }
}
